.class public Ldata/MainIconAdapter;
.super Landroid/widget/BaseAdapter;
.source "MainIconAdapter.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Ldata/MainIconAdapter$MyHolder;
    }
.end annotation


# instance fields
.field private context:Landroid/content/Context;

.field imageLoader:LPlugclass/ImageLoader;

.field private inflater:Landroid/view/LayoutInflater;

.field private m:Lmyapp/MyApp;

.field private maBeans:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lbean/MainIconBean;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Ljava/util/List;)V
    .locals 1
    .param p1, "context"    # Landroid/content/Context;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List",
            "<",
            "Lbean/MainIconBean;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 29
    .local p2, "maBeans":Ljava/util/List;, "Ljava/util/List<Lbean/MainIconBean;>;"
    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 30
    iput-object p1, p0, Ldata/MainIconAdapter;->context:Landroid/content/Context;

    .line 31
    iput-object p2, p0, Ldata/MainIconAdapter;->maBeans:Ljava/util/List;

    .line 32
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Ldata/MainIconAdapter;->inflater:Landroid/view/LayoutInflater;

    .line 34
    new-instance v0, LPlugclass/ImageLoader;

    invoke-direct {v0, p1}, LPlugclass/ImageLoader;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Ldata/MainIconAdapter;->imageLoader:LPlugclass/ImageLoader;

    .line 36
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Lmyapp/MyApp;

    iput-object v0, p0, Ldata/MainIconAdapter;->m:Lmyapp/MyApp;

    .line 37
    return-void
.end method


# virtual methods
.method public getCount()I
    .locals 1

    .prologue
    .line 43
    iget-object v0, p0, Ldata/MainIconAdapter;->maBeans:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1
    .param p1, "arg0"    # I

    .prologue
    .line 49
    iget-object v0, p0, Ldata/MainIconAdapter;->maBeans:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2
    .param p1, "arg0"    # I

    .prologue
    .line 55
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 4
    .param p1, "arg0"    # I
    .param p2, "arg1"    # Landroid/view/View;
    .param p3, "arg2"    # Landroid/view/ViewGroup;

    .prologue
    .line 62
    if-nez p2, :cond_0

    .line 63
    new-instance v0, Ldata/MainIconAdapter$MyHolder;

    invoke-direct {v0}, Ldata/MainIconAdapter$MyHolder;-><init>()V

    .line 64
    .local v0, "holder":Ldata/MainIconAdapter$MyHolder;
    iget-object v1, p0, Ldata/MainIconAdapter;->inflater:Landroid/view/LayoutInflater;

    const v2, 0x7f03006e

    const/4 v3, 0x0

    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 65
    const v1, 0x7f0c000a

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/ImageView;

    iput-object v1, v0, Ldata/MainIconAdapter$MyHolder;->imageView:Landroid/widget/ImageView;

    .line 66
    const v1, 0x7f0c0013

    invoke-virtual {p2, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    iput-object v1, v0, Ldata/MainIconAdapter$MyHolder;->textView:Landroid/widget/TextView;

    .line 67
    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    .line 72
    :goto_0
    iget-object v1, p0, Ldata/MainIconAdapter;->maBeans:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    if-ne p1, v1, :cond_1

    .line 73
    iget-object v1, v0, Ldata/MainIconAdapter$MyHolder;->imageView:Landroid/widget/ImageView;

    const v2, 0x7f020137

    invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 78
    :goto_1
    iget-object v2, v0, Ldata/MainIconAdapter$MyHolder;->textView:Landroid/widget/TextView;

    iget-object v1, p0, Ldata/MainIconAdapter;->maBeans:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lbean/MainIconBean;

    invoke-virtual {v1}, Lbean/MainIconBean;->getName()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 81
    return-object p2

    .line 69
    .end local v0    # "holder":Ldata/MainIconAdapter$MyHolder;
    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ldata/MainIconAdapter$MyHolder;

    .restart local v0    # "holder":Ldata/MainIconAdapter$MyHolder;
    goto :goto_0

    .line 75
    :cond_1
    iget-object v2, p0, Ldata/MainIconAdapter;->imageLoader:LPlugclass/ImageLoader;

    new-instance v3, Ljava/lang/StringBuilder;

    iget-object v1, p0, Ldata/MainIconAdapter;->m:Lmyapp/MyApp;

    invoke-virtual {v1}, Lmyapp/MyApp;->getWebConfig()Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v1

    invoke-direct {v3, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v1, p0, Ldata/MainIconAdapter;->maBeans:Ljava/util/List;

    invoke-interface {v1, p1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lbean/MainIconBean;

    invoke-virtual {v1}, Lbean/MainIconBean;->getImgurl()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v3, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iget-object v3, v0, Ldata/MainIconAdapter$MyHolder;->imageView:Landroid/widget/ImageView;

    invoke-virtual {v2, v1, v3}, LPlugclass/ImageLoader;->DisplayImage(Ljava/lang/String;Landroid/widget/ImageView;)V

    goto :goto_1
.end method
